#include "XK_Tools.h"

void XK_Send_Image(XK_uint8* XK_Image)
{
	XK_uint8 XK_data;
	XK_uint16 XK_i;
	XK_uint8 XK_j;

	for (XK_i = 0; XK_i < XK_ImgSize_H * XK_ImgSize_W; XK_i += 8)
	{
		XK_data = 0;
		for (XK_j = 0; XK_j < 8; XK_j++)
		{
			if (*(XK_Image + XK_i + XK_j))		XK_data |= 0x01 << (7 - XK_j);
		}
		XK_Putchar(XK_data);
	}
}

void XK_Send_Boundary(XK_uint8* XK_Left_Boundary, XK_uint8* XK_Right_Boundary)
{
	XK_uint8 XK_data;
	XK_uint8 XK_i, XK_j;
	if (XK_Left_Boundary != XK_NULL && XK_Right_Boundary != XK_NULL)
	{
		for (XK_i = 0; XK_i < XK_ImgSize_H; XK_i++)
		{
			XK_Putchar(*(XK_Left_Boundary + XK_i));
		}
		for (XK_i = 0; XK_i < XK_ImgSize_H; XK_i++)
		{
			XK_Putchar(*(XK_Right_Boundary + XK_i));
		}
	}
}
